from rest_framework import serializers

from core import serpy
from core.mixin.serializers import ModelCurrentUserSerializer
from toolkit.models import Toolkit


class ToolkitUpdateSerializer(serializers.ModelSerializer):
    class Meta:
        model = Toolkit
        fields = ['name', 'url', 'describe']


class ToolkitCreateSerializer(ModelCurrentUserSerializer):
    class Meta:
        model = Toolkit
        fields = ['name', 'url', 'describe', 'created_by']


class ToolkitListSerializer(serpy.Serializer):
    id = serpy.IntField()
    name = serpy.StrField()
    url = serpy.StrField()
    describe = serpy.StrField()
